package com.example.springbootsocketclient1.controller;

import com.example.springbootsocketclient1.socket.MyWebSocketClient;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Resource
    private MyWebSocketClient webSocketClient;

    @RequestMapping ("/send/{message}")
    public void sendRequest(@PathVariable String message){
//        System.out.println(123);
        webSocketClient.send(message);
    }
}
